package com.suyafei.feign;

import com.suyafei.request.LockProductRequest;
import com.suyafei.util.JsonData;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @program: suyafei-1024-shop
 * @description
 * @author: luffy
 * @create: 2021-03-23 16:25
 */
@FeignClient("suyafei-product-service")
public interface ProductFeignService {
    /**
     * 获取购物车最新的商品价格（删除对应的购物车商品）
     * @param productIdLIst
     * @return
     */
    @PostMapping("/api/cart/v1/confirm_order_cart_items")
    JsonData confirmOrderCartItems(@RequestBody List<Long> productIdLIst);

    /**
     * 锁定库存
     * @param lockProductRequest
     * @return
     */
    @PostMapping("/api/product/v1/lock_products")
    JsonData lockProducts(@RequestBody LockProductRequest lockProductRequest);
}
